home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / hack / 3_1_3 / sys / amiga / windefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-07  |  3.5 KB  |  156 lines

  1. /*    SCCS Id: @(#)windefs.h    3.1    93/04/02 */
  2. /* Copyright (c) Gregg Wonderly, Naperville, Illinois,  1991,1992,1993. */
  3. /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5. /* These should probably not even be options, but, I will leave them
  6.  * for now... GGW
  7.  */
  8.  
  9. #include "hack.h"
  10. #include "wintype.h"
  11. #include "winami.h"
  12. #include "func_tab.h"
  13.  
  14. /*#define   TOPL_GETLINE    /* Don't use a window for getlin() */
  15. /*#define   WINDOW_YN        /* Use a window for y/n questions */
  16.  
  17. #include <exec/types.h>
  18. #include <exec/memory.h>
  19. #include <exec/io.h>
  20. #include <dos.h>
  21. #include <exec/alerts.h>
  22. #include <exec/devices.h>
  23. #include <exec/execbase.h>
  24. #include <devices/console.h>
  25. #include <devices/conunit.h>
  26. #include <graphics/gfxbase.h>
  27. #include <intuition/intuition.h>
  28. #include <intuition/intuitionbase.h>
  29. #include <libraries/dosextens.h>
  30. #include <ctype.h>
  31. #undef  strcmpi
  32. #include <string.h>
  33. #include <errno.h>
  34.  
  35. #ifdef  IDCMP_CLOSEWINDOW
  36. # ifndef    INTUI_NEW_LOOK
  37. #  define    INTUI_NEW_LOOK
  38. # endif
  39. #endif
  40.  
  41. #ifdef AZTEC_C
  42. #include <functions.h>
  43. #else
  44. #include <proto/dos.h>
  45. #include <proto/exec.h>
  46. #include <proto/console.h>
  47. #ifdef    VIEWWINDOW
  48. #include <proto/layers.h>
  49. #endif
  50. #include <proto/diskfont.h>
  51.  
  52. /* kludge - see amirip for why */
  53. # undef red
  54. # undef green
  55. # undef blue
  56. # include <proto/graphics.h>
  57.  
  58. #ifndef __SASC_60
  59. #undef index
  60. # define index strchr
  61. #endif
  62.  
  63. #include <proto/intuition.h>
  64. #endif
  65.  
  66. #ifdef    SHAREDLIB
  67. #include "amiga:lib/libmacs.h"
  68. #endif
  69.  
  70. #ifdef    INTUI_NEW_LOOK
  71. #include <utility/tagitem.h>
  72. #endif
  73.  
  74. /* cw->data[x] contains 2 characters worth of special information.  These
  75.  * characters are stored at the offsets as described here.
  76.  */
  77. #define VATTR      0    /* Video attribute is in this slot */
  78. #define SEL_ITEM  1    /* If this is a select item, slot is 1 else 0 */
  79. #define SOFF      2    /* The string starts here.  */
  80.  
  81. /* Nethack defines NULL as ((char *)0) which is very inconvienent... */
  82. #undef NULL
  83. #define NULL 0L
  84.  
  85. /*
  86.  * Versions we need of various libraries.  We can't use LIBRARY_VERSION
  87.  * as defined in <exec/types.h> because some of the libraries we need
  88.  * don't have that version number in the 1.2 ROM.
  89.  */
  90.  
  91. #define INTUITION_VERSION    33L
  92. #define GRAPHICS_VERSION    33L
  93. #define DISKFONT_VERSION    34L
  94. #define ICON_VERSION        34L
  95.  
  96. /* These values are just sorta suggestions in use, but are minimum requirements
  97.  * in reality...
  98.  */
  99. #define WINDOWHEIGHT    192
  100. #define SCREENHEIGHT    200
  101. #define WIDTH        640
  102.  
  103. /* This character is a solid block (cursor) in Hack.font */
  104. #define CURSOR_CHAR    0x90
  105.  
  106. #define FONTHEIGHT    8
  107. #define FONTWIDTH    8
  108. #define FONTBASELINE    8
  109.  
  110. #ifdef    VIEWWINDOW
  111. #define MAPFTWIDTH    4
  112. #define MAPFTHEIGHT    4
  113. #define MAPFTBASELN    3
  114. #define VIEWCHARWIDTH    16    /* Each square is 16 pixels wide */
  115. #define VIEWCHARHEIGHT    16    /* Each square is 16 pixels tall */
  116. #else
  117. #define MAPFTWIDTH    8
  118. #define MAPFTHEIGHT    8
  119. #define MAPFTBASELN    6
  120. #endif
  121.  
  122. /* If Compiling with the "New Look", redefine these now */
  123. #ifdef  INTUI_NEW_LOOK
  124. #define NewWindow ExtNewWindow
  125. #define NewScreen ExtNewScreen
  126. #endif
  127.  
  128. #define         SIZEOF_DISKNAME 8
  129.  
  130. #define CSI     '\x9b'
  131. #define NO_CHAR     -1
  132. #define RAWHELP     0x5F    /* Rawkey code of the HELP key */
  133.  
  134. #define C_BLACK        0
  135. #define C_WHITE        1
  136. #define C_BROWN        2
  137. #define C_CYAN        3
  138. #define C_GREEN        4
  139. #define C_MAGENTA    5
  140. #define C_BLUE        6
  141. #define C_RED        7
  142. #ifdef    VIEWWINDOW
  143. #define C_VBLACK0    8
  144. #define C_VBLACK1    9
  145. #define C_VBLACK2    10
  146. #define C_VBLACK3    11
  147. #define C_VBLACK4    12
  148. #define C_VBLACK5    13
  149. #define C_VBLACK6    14
  150. #define C_VBLACK7    15
  151. #endif
  152.  
  153. /* topl kludges */
  154. #define TOPL_NOSPACE    topl_addspace=0
  155. #define TOPL_SPACE    topl_addspace=1
  156.